package com.adams.info;

import java.io.File;
import java.util.HashSet;
import java.util.Set;

import com.adams.utils.SystemConfig;

/**
 * 
 * 
 * File Name : AdamsConstant.java
 * 
 * @Description : 常量类
 * @author 904203 肖震
 */
public class AdamsConstant
{
    /**
     * 事件权限前缀
     */
    public static String ROLE_EVENT="event_";
    
	/**
	 * 系统一次性加载文章列表数 key值
	 */
	public static String SYS_MAX_LOAD_ARTICLES = "sys_max_load_articles";

	/**
	 * 系统默认Trigger
	 */
	public static String SYS_DEFAULT_TASKTRIGGER = "taskTrigger";

	/**
	 * 系统用户定义任务trigger前缀
	 */
	public static String SYS_QUARTZ_TRIGGER = "trigger";

	/**
	 * 系统OCG开关 key值
	 */
	public static String SYS_OCG_SWITCH = "sys_ocg_switch";

	/**
	 * 系统ocg下发阀值
	 */
	public static String MAX_OCG_PAGE_SIZE = "sys_max_ocg_page_size";

	/**
	 * OCG开关关
	 */
	public static String SYS_OCG_SWITCH_CLOSE = "0";

	/**
	 * OCG开关开
	 */
	public static String SYS_OCG_SWITCH_OPEN = "1";

	/**
	 * 业务静态页命名前缀
	 */
	public static String PAGE_NAME_FOR_BUSINESS = "index";

	/**
	 * 栏目静态页命名前缀
	 */
	public static String PAGE_NAME_FOR_CHANNEL = "channel_";
	/**
	 * 视频栏目静态页命名前缀
	 */
	public static String PAGE_NAME_FOR_AUDIO_CHANNEL = "audio_channel_";

	/**
	 * 元数据静态页命名前缀
	 */
	public static String PAGE_NAME_FOR_ARTICLE = "article_";

	/**
	 * 数据状态：初始化
	 */
	public static int DATA_STATUS_INITIALIZATION = 1;

	/**
	 * 数据状态：新建待审核
	 */
	public static int DATA_STATUS_TOAUDIT_FOR_CREATE = 2;

	/**
	 * 数据状态：正常删除待审核
	 */
	public static int DATA_STATUS_NORMAL_TOAUDIT_FOR_DELETE = 3;

	/**
	 * 数据状态：修改
	 */
	public static int DATA_STATUS_CHANGE = 4;

	/**
	 * 数据状态：修改待审核
	 */
	public static int DATA_STATUS_TOAUDIT_FOR_CHANGE = 5;

	/**
	 * 数据状态：修改删除待审核
	 */
	public static int DATA_STATUS_CHANGE_TOAUDIT_FOR_DELETE = 6;

	/**
	 * 数据状态：已删除
	 */
	public static int DATA_STATUS_DELETE = -1;

	/**
	 * 数据状态：正常
	 */
	public static int DATA_STATUS_NORMAL = 0;

	/**
	 * 审核通过 sl
	 */
	public static String AUDIT_STATUS_PASS_RETURN = "pass";
	/**
	 * 审核拒绝 sl
	 */
	public static String AUDIT_STATUS_REFUSE_RETURN = "overrule";

	/**
	 * 栏目树虚拟menuID号 sl
	 */
	public static Long CHANNEL_TREE_MENUID = new Long(777);

	/**
	 * 文章视图虚拟menuID号 sl
	 */
	public static Long ARTICLE_MENUID = new Long(888);

	/**
	 * 视频视图虚拟menuID号 sl
	 */
	public static Long VIDEO_MENUID = new Long(999);

	/**
	 * 文章列表栏目树虚拟menuID号
	 */
	public static Long ARTICLETREE_MENUID = new Long(17);

	/**
	 * 文章列表虚拟menuID号
	 */
	public static Long ARTICLETBALE_MENUID = new Long(18);

	/**
	 * 视频列表虚拟menuID号
	 */
	public static Long ARTICLEVEDIO_MENUID = new Long(19);

	/**
	 * 文章审核列表虚拟menuID号
	 */
	public static Long ARTICLEAUDIT_MENUID = new Long(21);

	/**
	 * 审核通过
	 */
	public static String AUDIT_STATUS_PASS = "0";
	/**
	 * 审核拒绝
	 */
	public static String AUDIT_STATUS_REFUSE = "-1";
	/**
	 * 创建发送审核通知类型
	 */
	public static int CREATE_ACTION_TYPE = 1;
	/**
	 * 修改发送审核通知类型
	 */

	public static int EDIT_ACTION_TYPE = 2;
	/**
	 * 删除发送审核通知类型
	 */

	public static int DELETE_ACTION_TYPE = 3;

	/**
	 * 默认CSS发布目录
	 */
	public static String DEFAULT_DESDIR_CSS = "css";

	/**
	 * 默认模板图片发布目录
	 */
	public static String DEFAULT_DESDIR_IMG = "images";

	/**
	 * 默认JS文件发布目录
	 */
	public static String DEFAULT_DESDIR_JS = "js";

	/**
	 * 默认元数据图片发布目录
	 */
	public static String DEFAULT_DESDIR_VAS_IMG = "media";

	/**
	 * 模板图片目录名
	 */
	public static String TEMPLATE_IMG_DIR = "images";

	/**
	 * 模板js目录名
	 */
	public static String TEMPLATE_JS_DIR = "js";

	/**
	 * 模板css目录名
	 */
	public static String TEMPLATE_CSS_DIR = "css";

	/**
	 * 发布对象 业务类型
	 */
	public static String RELEASE_REPORT_OBJ_TYPE_BUSINESS = "business";
	/**
	 * 发布对象 栏目类型
	 */
	public static String RELEASE_REPORT_OBJ_TYPE_CHANNEL = "channel";
	/**
	 * 发布对象 文章类型
	 */
	public static String RELEASE_REPORT_OBJ_TYPE_ARTICLE = "article";

	// 模板文件解压缩输出目录
	/*
	 * public static final String TEMPLATE_OUTPUTPATHS = CommonUtils
	 * .getWebPackageDir() + CommonUtils.getSysFileSeparator(); public static
	 * final String TEMPLATE_OUTPUTPATH = CommonUtils .getWebPackageDir() +
	 * CommonUtils.getSysFileSeparator() +
	 * SystemConfig.getInstance().getString("template.file.root.dir") +
	 * CommonUtils.getSysFileSeparator(); // about.xml文件名称 public static final
	 * String ABOUT_FILE_NAME = SystemConfig.getInstance()
	 * .getString("template.about.file.name"); // about.jpg文件名称 public static
	 * final String PREVIEW_IMG_FILE_NAME = SystemConfig
	 * .getInstance().getString("template.preview.file.name");
	 */

	// 模板使用状态:未被使用
	public static final String TEMPLATE_ISUSER_N = "0";

	/**
	 * 模板路径
	 */
	public static final String TEMPLATE = "template";

	/**
	 * 路径分隔符
	 */
	public static final char SPT = '/';
	/**
	 * 系统路径分隔符
	 */
	public static final char FILE_SPT = File.separatorChar;
	// 模板类型,高清模板
	public static final String TEMPLATE_TYPE_HD = "HD";
	// 模板类型,标清模板
	public static final String TEMPLATE_TYPE_SD = "SD";

	public static String OCG = "ocg";

	public static String PORTAL = "portal";

	public static String PREVIEWTYPE = "3";

	/**
	 * 栏目大图文件后缀
	 */
	public static String CHANNEL_BIG_PHOTO_SUF = "b";

	/**
	 * 栏目小图文件后缀
	 */
	public static String CHANNEL_SMALL_PHOTO_SUF = "s";

	/**
	 * 栏目音频文件后缀
	 */
	public static String CHANNEL_AUDIO_SUF = "ca";

	/**
	 * 栏目文件后缀集
	 */
	public final static Set<String> CHANNEL_MEDIA_SUF_SET = new HashSet<String>();
	static
	{
		CHANNEL_MEDIA_SUF_SET.add(CHANNEL_BIG_PHOTO_SUF);
		CHANNEL_MEDIA_SUF_SET.add(CHANNEL_SMALL_PHOTO_SUF);
		CHANNEL_MEDIA_SUF_SET.add(CHANNEL_AUDIO_SUF);
	}

	/**
	 * 元数据标题图文件后缀
	 */
	public static String ARTICLE_TITLE_PHOTO_SUF = "t";

	/**
	 * 元数据内容图文件后缀
	 */
	public static String ARTICLE_CONTENT_PHOTO_SUF = "c";

	/**
	 * 元数据音频文件后缀
	 */
	public static String ARTICLE_AUDIO_SUF = "aa";

	/**
	 * 元数据标题图文件后缀
	 */
	public static String ICON_SUF = "i";

	/**
	 * portal 出错页面名称
	 */
	public static String PROTAL_ERROR_PAGE = "error.html";

	/**
	 * ocg 出错页面名称
	 */
	public static String OCG_ERROR_PAGE = "ocgerror.html";

	/**
	 * 后台参数group code
	 */
	public static String SYS_CODE = "ADAMS";

	/**
	 * xml tree key 值
	 */
	public static String XML_PATH_KEY = "release.xml.dir";

	/**
	 * xml tree 文件名称
	 */
	public static String XML_FILENAME = "tree.xml";

	/**
	 * 定时发布参数默认
	 */
	public static String RELEASE_TIME_DEFAULT = "release.time.default";
	/**
	 * 定时发布参数1
	 */
	public static String RELEASE_TIME_ONE = "release.time.one";
	/**
	 * 定时发布参数1
	 */
	public static String RELEASE_TIME_TWO = "release.time.two";

	/**
	 * 系统参数 值数值类型
	 */
	public static String SYSPARAMETER_VALUETYPE_NUMBER = "0";
	/**
	 * 系统参数 值字母类型
	 */
	public static String SYSPARAMETER_VALUETYPE_LETTERS = "1";
	/**
	 * 系统参数 值加字母类型
	 */
	public static String SYSPARAMETER_VALUETYPE_OTHER = "-1";

	/**
	 * 模板使用状态，被使用
	 */
	public static String TEMPLATE_IS_USE = "yes";

	/**
	 * 模板使用状态，未被使用
	 */
	public static String TEMPLATE_IS_NOUSE = "no";

	/**
	 * 位置类型 1:VAS Portal 总入口页 2:VAS Portal 业务首页 3:VAS Portal 业务中特性页面 4:VAS
	 * Portal 栏目列表类页面 5:VAS Portal 产品内容详情页面
	 */
	public static int ADLOCATE_POSTYPE_PORTAL = 1;

	public static int ADLOCATE_POSTYPE_BUSINESS = 2;

	public static int ADLOCATE_POSTYPE_BUSINESSSPEC = 3;

	public static int ADLOCATE_POSTYPE_CHANNEL = 4;

	public static int ADLOCATE_POSTYPE_ARTICLE = 5;

	/**
	 * 广告状态 1:初始化 2:广告播出 3:广告停止
	 * 
	 */
	public static int AD_INITIAL = 1;

	public static int AD_BROADCASTING = 2;

	public static int AD_STOP = 3;

	// 模板选择时默认选项
	public static String NO_TEMPLATE = "不选择模板";

	// 文章审核 页面
	public static String ARTICLE_AUDIT_VIEW_URL = SystemConfig.getInstance()
			.getString("article.audit.view.url");
}
